<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        console.dir(String);

        let str = 'sdfghjklpoiritri';
        console.log(str.includes('a'));
        //判断是否以指定字符开头，是=true  不是=false

        console.log(str.startsWith('w'));
        //判断是否以指定字符结尾

        console.log(str.endsWith('i'));
        // 指定字符串

        console.log(str.repeat(2));
        //判断当前的数是否是个数限制，是=true ，不是=false
        console.log(Number.isFinite(5));
        console.log(Number.isFinite(Infinity));
        console.log(Number.isFinite(NaN));
        console.log(Number.isFinite(100 / 1));

        //Number.isNaN 判断是否nan
        console.log(Number.isNaN(NaN));
        console.log(Number.isNaN(5));

        console.log(Number.isInteger(-5));
        // Number.isInteger() 判断是否是 5.0整数 是整数=true,不是=fals

        console.log(Math.trunc(5.20));
        // Math.trunc 去除小数

        console.log(th.sign(0));
        // Math.sign判断一个数是正数，负数 -1 0 返回0

    </script>
</body>

</html>